package Launcher;

import org.jdesktop.swingx.JXLoginDialog;
import org.jdesktop.swingx.JXLoginPanel;
import org.jdesktop.swingx.auth.JDBCLoginService;

import Gui.ManagementConsole;


public class laucher {
    public static void main(String... args) {
        
    	final JDBCLoginService svc = new JDBCLoginService(
                                                 "sun.jdbc.odbc.JdbcOdbcDriver",
                                                 "jdbc:odbc:QestionsRepas");
        JXLoginPanel.Status status = JXLoginPanel.showLoginDialog(null, svc);
        if (status == JXLoginPanel.Status.SUCCEEDED) {
            System.out.println("Login Succeeded!");
            ManagementConsole.main(args);
        } else {
            System.out.println("Login Failed: " + status);
            ManagementConsole.main(args);
        }
        try {svc.getConnection().close();} catch (Exception ex) {}
        

        
    }
}
